package com.mce.nebula.enums;

/**
 * 应用范围枚举
 */
public enum AppScope {
    ENTERPRISE("enterprise", "企业"),
    TEAM("team", "团队"),
    GOODRAIN("goodrain", "好雨云市");

    private final String value;
    private final String description;

    AppScope(String value, String description) {
        this.value = value;
        this.description = description;
    }

    public String getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public static AppScope fromValue(String value) {
        for (AppScope scope : AppScope.values()) {
            if (scope.getValue().equals(value)) {
                return scope;
            }
        }
        throw new IllegalArgumentException("Invalid AppScope value: " + value);
    }
}